<?php
/* @var $this NdkHealthController */
/* @var $model NdkHealth */
?>

<?php
$this->breadcrumbs=array(
	'Klaim'=>array('index'),
	'View',
);

$this->menu=array(
	array('label'=>'List NdkHealth', 'url'=>array('index')),
	array('label'=>'Manage NdkHealth', 'url'=>array('admin')),
);
?>

<h1>Lihat Klaim</h1>
<br />
<a href="<?php echo Yii::app()->createUrl('histClaim/admin'); ?>" class="btn btn-sm btn-primary">Kembali</a><br /><br />
<br />
<table>
<tr>
<td width="100"><strong>No Polis<strong></td>
<td><strong><?php echo $model->policy_no; ?></strong></td>
</tr>
<td width="100"><strong>Periode Polis<strong></td>
<td><strong><?php 
if($model->type_reg_policy=='1'){
echo date("d-m-Y",strtotime(RegHealthPolicy::model()->findByPk($model->reg_policy_id)->start_periode))." s/d ".date("d-m-Y",strtotime(RegHealthPolicy::model()->findByPk($model->reg_policy_id)->end_periode));
}else{
echo date("d-m-Y",strtotime(RegHealthPolicyNon::model()->findByPk($model->reg_policy_id)->start_periode))." s/d ".date("d-m-Y",strtotime(RegHealthPolicyNon::model()->findByPk($model->reg_policy_id)->end_periode));
}
?></strong></td>
</tr>
<tr>
<td width="100"><strong>Klien<strong></td>
<td><strong><?php echo MstClient::model()->findByPk($model->mst_client_id)->name; ?></strong></td>
</tr>
</table>
<br />

<?php 
$this->widget('bootstrap.widgets.TbGridView',array(
	'id'=>'ndk-health-grid',
	'dataProvider'=>$modelAnggota->searchView($model->id),
	//'filter'=>$model,
	'columns'=>array(
		array(
		'header'=>'Karyawan',
		'value'=>'$data->karyawan',
		),
		array(
		'header'=>'Peserta',
		'value'=>'$data->peserta',
		 ),
		array(
		'header'=>'No Reg',
		'value'=>'$data->no_reg',
		 ),
		 array(
		'header'=>'Tgl Input',
		'value'=>'date("d-m-Y",strtotime($data->createdtime))',
		),
		array(
		'header'=>'Tgl Pengobatan',
		'value'=>'$data->plan=="IP" ? date("d-m-Y",strtotime($data->tgl_claim)). " s/d " .date("d-m-Y",strtotime($data->tgl_claim2)) : date("d-m-Y",strtotime($data->tgl_claim))',
		 ),
		array(
		'header'=>'Manfaat',
		'value'=>'$data->plan',
		 ),
		array(
		'header'=>'Status',
		'value'=>'$data->getStatus(HistClaimStatus::model()->find("id_hist_claim_anggota=".$data->id." order by id desc")->status)',
		 ),
		
		array(
		'header'=>'Jumlah Klaim',
		'value'=>'number_format($data->nominal,0,",",".")',
		 ),
		 
		array(
		'header'=>'Jumlah Pembayaran',
		'value'=>'number_format($data->jumlah_dibayar,0,",",".")',
		 ),
		
		array(
		'header'=>'Tanggal Pembayaran',
		'value'=>'$data->tgl_pembayaran=="1970-01-01 00:00:00" ? "" : date("d-m-Y",strtotime($data->tgl_pembayaran))',
		 ),
		array(
		'header'=>'Keterangan',
		'value'=>'HistClaimStatus::model()->find("id_hist_claim_anggota=".$data->id." order by id desc")->remarks',
		 ),
	),
)); 
?>

